home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / allmac21.arc / SET10.ARC / SET10.QM < prev   
Text File  |  1990-08-27  |  2KB  |  41 lines

  1. *             Macro To Get Dos Envirnoment Variable, v1.0
  2. *                               SET10.QM
  3. *
  4. * This QEdit macro will access a Dos environment variable. To run,
  5. * press Alt_0 and the variable and it's name will show highlighted on
  6. * the screen. Press 'Enter' to remove from the screen. This macro is
  7. * based on a suggestion how to do this from Tim Farley of SemWare.
  8. * Change 'COMSPEC' below to the variable you wish to find. Replacing
  9. * "COMSPEC" altogether with 'pause' will allow the user to input enough
  10. * letters for the command to be found. The macro will also run faster
  11. * if 'C:' below is changed to a ram disk. Compile the changed macro
  12. * with QMAC.
  13. *
  14. @0 macrobegin
  15.         unmarkblock                     * get ready
  16.         dropanchor                      * mark file to return
  17.         editfile "c:$" return  quit     * quit tempfile from ring
  18.         gotoblockbeg                    * go back to mark
  19.         unmarkblock                     * remove
  20.         dos "set>c:$"                   * get SET to tempfile
  21.         return return                   *
  22.         editfile return                 * load tempfile
  23. *       find  pause return return       * input variable to find
  24.         find  "COMSPEC" return return  ** search for COMSPEC *change**
  25.         begline                         * go to found begin
  26.         dropanchor                      * start mark
  27.         endline                         * mark it all
  28.         copy                            * get to scrap
  29.         killfile                        * kill temp for next time
  30.         quit                            * remove temp from ring
  31.         begline                         * get ready to show variable
  32.         paste                           * show variable
  33.         pause                           * enter to remove
  34.         deleteblock                     * cleanup
  35.         makectrofscreen                 * for better viewing
  36. *
  37. * 51 bytes Tue  07-31-1990  22:52:01 input selected
  38. * 64 bytes Tue  07-31-1990  22:52:53 with 'COMSPEC'
  39.  
  40. *..Tom Hogshead
  41.